package mediator.main.colleague;

import mediator.main.mediator.IMediator;

/**
 * 用户A
 */
public class UserA extends AbstractUser {

    public UserA(IMediator mediator, String name) {
        super(mediator, name);
        //注册到中介对象中
        mediator.regiest(this);
    }

    /**
     * 接收消息
     */
    @Override
    public void receiveMessage(String message) {
        System.out.println(String.format("User A Received Message : %s", message));
    }
}
